<template>
  <div>
    <slot name="title"><h2>大标题</h2></slot>
      <table border="1" class="table table-bordered table-stripped">
          <thead>
              <tr>
                  <th>编号</th>
                  <th>资产名称</th>
                  <th>价格</th>
                  <th>创建时间</th>
                  <th>操作</th>
              </tr>
          </thead>
          <tbody>
              <tr v-for="item in data" :key="item.id">
                <td><slot name="id" :id="item.id">{{item.id}}</slot></td>
                <td><slot name="name2" :name3="item.name">{{item.name}}</slot></td>
                <td><slot name="price" :price="item.price">{{item.price}}</slot></td>
                <td><slot name="time" :time="item.time">{{item.time}}</slot></td>
                <td><slot name="btn"><a href="javascript:;">删除</a></slot></td>
              </tr>
          </tbody>
      </table>
  </div>
</template>

<script>
import 'bootstrap/dist/css/bootstrap.css'
export default {
  props: {
    data: {
      type: Array,
      required: true
    }
  }
}
</script>
